package mock.servicesdirectory.dao.daointerface;

import java.util.ArrayList;
import java.util.List;

import mock.servicesdirectory.web.model.SupportingMaterialList;

public class SupportingMaterialListDAO {
	private static List<SupportingMaterialList> SupportingMaterialListLst=new ArrayList<SupportingMaterialList>();
	 static int total=50;
	 static {
	        for(int i=1;i<total;i++)
	        {
	        	
	        	SupportingMaterialListLst.add(new SupportingMaterialList("SupportingMaterial "+i,"Address "+i,"Postcode "+i,"Contact "+i,"Is Active"));
	        }
	    }
		public static int nextInt(){
			return total++;
		}
		
		public static List<SupportingMaterialList> buildList(){
			return SupportingMaterialListLst;
		}
		
		public static int count(){
			return SupportingMaterialListLst.size();
		}
		
		public static List<SupportingMaterialList> find(int from,int to){
			return SupportingMaterialListLst.subList(from, to);
		}
		
		public static SupportingMaterialList findById(Integer id){
			
			return null;
		}
		
		public static void save(SupportingMaterialList org){
			SupportingMaterialListLst.add(org);
		}
		
		public static void update(SupportingMaterialList org){
			
		}
		
		public static void delete(SupportingMaterialList org){
			SupportingMaterialListLst.remove(org);
		}
		public static List<SupportingMaterialList> findNotById(int id,int from,int to){
			List<SupportingMaterialList> subLst =  SupportingMaterialListLst.subList(from,to);
			List<SupportingMaterialList> temp = new ArrayList<SupportingMaterialList>();
			
			return temp;
		}
		
		 public static List<SupportingMaterialList> findLesserAsId(int id, int from,int to)
		    {
		        List<SupportingMaterialList> subLst= SupportingMaterialListLst.subList(from, to);
		        List<SupportingMaterialList> temp=new ArrayList<SupportingMaterialList>();

		       
		        return temp;
		    }
		    public static List<SupportingMaterialList> findGreaterAsId(int id, int from,int to)
		    {
		    	  List<SupportingMaterialList> subLst=SupportingMaterialListLst.subList(from, to);
			      List<SupportingMaterialList> temp=new ArrayList<SupportingMaterialList>();

		        
		        return temp;
		    }
}
